import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

export default new VueRouter({
    mode:"hash",
    routes:[
        {
            path:"/shouye",
            name:"shouye",
            // component:()=>import("@/pages/ShouYe.vue"),
            components:{
                default:()=>import("@/pages/ShouYe.vue"),
                ShouYeOne:()=>import("@/pages/ShouYeOne.vue"),
            }

        },
        {
            path:"/fenlei",
            name:"fenlei",
            component:()=>import("@/pages/FenLei.vue"),
            children:[
                {
                    path:"/fenlei/shuiguo",
                    name:"shuiguoi",
                    component:()=>import("@/pages/fenlei/ShuiGuo.vue"),
                },
                {
                    path:"/fenlei/shengxian",
                    name:"shengxian",
                    component:()=>import("@/pages/fenlei/ShengXian.vue"),
                },
                {
                    path:"/fenlei/chaoshi",
                    name:"chaoshi",
                    component:()=>import("@/pages/fenlei/ChaoShi.vue"),
                },
                {
                    path:'/fenlei',
                    redirect:"/fenlei/shuiguo"
                }
            ]
        },
        {
            path:"/wode",
            name:"wode",
            components:{
                default:()=>import("@/pages/WoDe.vue"),
                ShouYeOne:()=>import("@/pages/ShouYeOne.vue"),
            }
        },
        {
            path:'/',
            redirect:"shouye"
        }
    ]
})